package tj.eskhata.pos.examples;

import java.util.Date;

import org.apache.wicket.extensions.yui.calendar.DateTimeField;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.PropertyModel;

public class DateTimeFieldPage extends WebPage {
	private Date date = new Date();
	
	public DateTimeFieldPage() {
		Form form = new Form("form") {
			@Override
			protected void onSubmit() {
				info("new date value: " + date);
			}
		};
		add(form);
		PropertyModel model = new PropertyModel(this, "date");
		form.add(new DateTimeField("dateTime", model));
		add(new FeedbackPanel("feedback"));
	}
}
